home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-12-12 | 4.1 KB | 148 lines | [TEXT/MPS ] |
- {
- File: TranslationExtensions.p
-
- Copyright: © 1984-1994 by Apple Computer, Inc.
- All rights reserved.
-
- Version: Built by: anonymous
- From: TranslationExtensions.i, revision 4, dated 5/31/94
- With Interfacer: 1.1d4e2
-
- Bugs: Report bugs to Radar component “System Interfaces”, “Latest”
- List the version information from above in Problem Description.
-
- }
-
- {$IFC UNDEFINED UsingIncludes}
- {$SETC UsingIncludes := 0}
- {$ENDC}
-
- {$IFC NOT UsingIncludes}
- UNIT TranslationExtensions;
- INTERFACE
- {$ENDC}
-
- {$IFC UNDEFINED __TRANSLATIONEXTENSIONS__}
- {$SETC __TRANSLATIONEXTENSIONS__ := 1}
-
- {$I+}
- {$SETC TranslationExtensionsIncludes := UsingIncludes}
- {$SETC UsingIncludes := 1}
-
- {$SETC kSupportsFileTranslation := 1}
- {$SETC kSupportsScrapTranslation := 2}
- {$SETC kTranslatorCanGenerateFilename := 4}
- {$IFC UNDEFINED REZ }
-
- {$IFC UNDEFINED __MEMORY__}
- {$I Memory.p}
- {$ENDC}
- { Types.p }
- { ConditionalMacros.p }
- { MixedMode.p }
- { Traps.p }
-
- {$IFC UNDEFINED __FILES__}
- {$I Files.p}
- {$ENDC}
- { OSUtils.p }
- { SegLoad.p }
-
- {$IFC UNDEFINED __QUICKDRAW__}
- {$I Quickdraw.p}
- {$ENDC}
- { QuickdrawText.p }
- { IntlResources.p }
-
- {$IFC UNDEFINED __COMPONENTS__}
- {$I Components.p}
- {$ENDC}
-
- TYPE
- FileType = OSType;
-
- ScrapType = ResType;
-
- TranslationAttributes = LONGINT;
-
- {$SETC taDstDocNeedsResourceFork := 1}
- {$SETC taDstIsAppTranslation := 2}
- {$ALIGN MAC68K}
- FileTypeSpec = PACKED RECORD
- format: FileType;
- hint: LONGINT;
- flags: TranslationAttributes;
- catInfoType: OSType;
- catInfoCreator: OSType;
- END;
- {$ALIGN RESET}
- {$ALIGN MAC68K}
- FileTranslationList = PACKED RECORD
- modDate: LONGINT;
- groupCount: LONGINT;
- END;
- {$ALIGN RESET}
- FileTranslationListPtr = ^FileTranslationList;
- FileTranslationListHandle = ^FileTranslationListPtr;
-
- {$ALIGN MAC68K}
- ScrapTypeSpec = PACKED RECORD
- format: ScrapType;
- hint: LONGINT;
- END;
- {$ALIGN RESET}
- {$ALIGN MAC68K}
- ScrapTranslationList = PACKED RECORD
- modDate: LONGINT;
- groupCount: LONGINT;
- END;
- {$ALIGN RESET}
- ScrapTranslationListPtr = ^ScrapTranslationList;
- ScrapTranslationListHandle = ^ScrapTranslationListPtr;
-
- TranslationRefNum = LONGINT;
-
-
- FUNCTION SetTranslationAdvertisement(refNum: TranslationRefNum; advertisement: PicHandle): OSErr;
- {$IFC USES68KINLINES}
- INLINE $7002, $ABFC;
- {$ENDC}
- FUNCTION UpdateTranslationProgress(refNum: TranslationRefNum; percentDone: INTEGER; VAR canceled: BOOLEAN): OSErr;
- {$IFC USES68KINLINES}
- INLINE $7001, $ABFC;
- {$ENDC}
-
- CONST
- kTranslateGetFileTranslationList = 0;
- kTranslateIdentifyFile = 1;
- kTranslateTranslateFile = 2;
- kTranslateGetTranslatedFilename = 3;
- kTranslateGetScrapTranslationList = 10;
- kTranslateIdentifyScrap = 11;
- kTranslateTranslateScrap = 12;
-
- TYPE
- DoGetFileTranslationListProcPtr = ProcPtr; { FUNCTION (self: ComponentInstance; translationList: FileTranslationListHandle): ComponentResult; }
-
- DoIdentifyFileProcPtr = ProcPtr; { FUNCTION (self: ComponentInstance; theDocument: FSSpec; VAR docType: FileType): ComponentResult; }
-
- DoTranslateFileProcPtr = ProcPtr; { FUNCTION (self: ComponentInstance; refNum: TranslationRefNum; sourceDocument: FSSpec; srcType: FileType; srcTypeHint: LONGINT; dstDoc: FSSpec; dstType: FileType; dstTypeHint: LONGINT): ComponentResult; }
-
- DoGetTranslatedFilenameProcPtr = ProcPtr; { FUNCTION (self: ComponentInstance; dstType: FileType; dstTypeHint: LONGINT; VAR theDocument: FSSpec): ComponentResult; }
-
- DoGetScrapTranslationListProcPtr = ProcPtr; { FUNCTION (self: ComponentInstance; list: ScrapTranslationListHandle): ComponentResult; }
-
- DoIdentifyScrapProcPtr = ProcPtr; { FUNCTION (self: ComponentInstance; dataPtr: UNIV Ptr; dataLength: Size; VAR dataFormat: ScrapType): ComponentResult; }
-
- DoTranslateScrapProcPtr = ProcPtr; { FUNCTION (self: ComponentInstance; refNum: TranslationRefNum; srcDataPtr: UNIV Ptr; srcDataLength: Size; srcType: ScrapType; srcTypeHint: LONGINT; dstData: Handle; dstType: ScrapType; dstTypeHint: LONGINT): ComponentResult; }
-
- {$ENDC}
-
- {$SETC UsingIncludes := TranslationExtensionsIncludes}
-
- {$ENDC} {__TRANSLATIONEXTENSIONS__}
-
- {$IFC NOT UsingIncludes}
- END.
- {$ENDC}
-